##############################################################
## MOD Title: Welcome PM Mod Uninstall upgrade instructions from ALL versions PRE 2.2.3
## MOD Author: ..::Frans::.. < frans@infopolitie.nl > (Frans) http://www.infopolitie.nl
## MOD Description: You only need to follow these instructions if you are currently using any version before
##                  version 2.2.3. (Thnx go to WhiteWolfSix!)
## MOD Version: 2.2.3
##
## Installation Level: EASY
## Installation Time: 1 minute
## Files To Edit: includes/functions.php
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
           /*
            * Welcome PM on First Login (WPM)
            * By DualFusion /adjusted by ..::Frans::.. for phpbb3 GOLD
            */
            $sql = 'SELECT wpm_enable FROM '.WPM_TABLE.' WHERE wpm_config_id =1';
            $result = $db->sql_query($sql);
            $row = $db->sql_fetchrow($result);
            $db->sql_freeresult($result);


            if($row['wpm_enable'] && $user->data['user_lastvisit'] == 0)
            {
                include($phpbb_root_path . 'includes/functions_wpm.' . $phpEx);
                $wpm = new welcome_pm();
                $wpm->get_vars();
                $wpm->send_wpm();
            }
            /* End WPM */
            // append/replace SID (may change during the session for AOL users)
            $redirect = reapply_sid($redirect);

            // Special case... the user is effectively banned, but we allow founders to login
            if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER)
            {
                return;
            }
#
#-----[ REPLACE WITH ]------------------------------------------
#
            // append/replace SID (may change during the session for AOL users)
            $redirect = reapply_sid($redirect);

            // Special case... the user is effectively banned, but we allow founders to login
            if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER)
            {
                return;
            }
            /*
            * Welcome PM on First Login (WPM)
            * By DualFusion /adjusted by ..::Frans::.. for phpbb3 GOLD
            */
            $sql = 'SELECT wpm_enable FROM '.WPM_TABLE.' WHERE wpm_config_id =1';
            $result = $db->sql_query($sql);
            $row = $db->sql_fetchrow($result);
            $db->sql_freeresult($result);


            if($row['wpm_enable'] && $user->data['user_lastvisit'] == 0)
            {
                include($phpbb_root_path . 'includes/functions_wpm.' . $phpEx);
                $wpm = new welcome_pm();
                $wpm->get_vars();
                $wpm->send_wpm();
            }
            /* End WPM */

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

